package com.gxa.ehome.Command2;

import com.gxa.ehome.Command1.Light;
import com.gxa.ehome.Command1.Stereo;
import org.junit.jupiter.api.Test;

public class TestControl {
    @Test
   public void test(){
        Control ctl;
         Light light=new Light("Bedroom Light");
        Stereo stereo=new Stereo();
        ctl=new TraditionControl(light,stereo);//传入控制器
        ctl.onButton(0);
        ctl.offButton(0);
        ctl.onButton(1);
        ctl.onButton(2);
        ctl.offButton(2);
        ctl.offButton(1);

   }
}
